from ..attributes import *


class GUIPrimitive(Object):
    data_path = Attribute()
    debug     = Attribute(initial = False)
    
    model  = Attribute(initiable = False)
    screen = Attribute(initiable = False)
    
    def setup(self):
        if self.debug:
            self.set_debug_mode()
    
    def setup_primitive(self):
        'Sets up all primitive related information. Called when the GUI Core is ready.'
    
    def set_debug_mode(self):
        'Sets the GUI to debug mode. The exact meaning of this is framework-dependent.'

    def set_title(self, title):
        'Sets the application title.'
    
    def set_frame_size(self, width, height):
        'Sets the size of the main frame.'
    
    def run(self):
        'Starts the application by showing the GUI.'
